package oa.hleast.xswl.service.oms.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import oa.hleast.xswl.mapper.oms.OrderItemMapper;
import oa.hleast.xswl.pojo.domain.oms.OmsOrderItem;
import oa.hleast.xswl.service.oms.IOrderItemService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Slf4j
@Transactional
@Service
public class OrderItemServiceImpl extends ServiceImpl<OrderItemMapper, OmsOrderItem> implements IOrderItemService {


    @Override
    public List<OmsOrderItem> getByOrderId(Long orderId) {
        List<OmsOrderItem> list = this.list(new LambdaQueryWrapper<OmsOrderItem>()
                .eq(OmsOrderItem::getOrderId, orderId)
        );

        return list;
    }
}
